package org.halk.controller;

import org.halk.service.BizService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 使用Map与函数式接口来优化多个if-else情况
 *
 * @Author zhuhao
 * @Date 2022/2/28 15:00
 * @desc
 */
@RestController
@RequestMapping("/biz")
public class BizController {

    @Resource(name = "bizService2Impl")
    private BizService bizService;

    @GetMapping("/test/{key}")
    public String test(@PathVariable String key) {
        return this.bizService.getCheckResultSuper(key);
    }
}
